package com.company;

import java.io.*;

/**
 * Created by asus on 2017/8/25.
 */
public class BasicFileOutput {
    static String file = "BasicFileOutpput.out";
    public static void main(String [] args) throws IOException {
        BufferedReader in = new BufferedReader(new StringReader(BufferedInputFile.read("D:\\test.txt")));
        PrintWriter out = new PrintWriter(file);
        int lineCount = 1;
        String s;
        while((s = in.readLine())!=null)
            out.println(lineCount++ +": " + s);
        out.close();
        System.out.println(BufferedInputFile.read(file));
    }

}
